#ifndef GLOBAL_H
#define GLOBAL_H
#include "single.h"
#include "Msg/Req/reqhead.h"
#include "Msg/HashtableMsg.h"
#include "Msg/Rsp/rspbase.h"
#include <QDateTime>
//#include <iostream>

class Global : public CMySingle<Global>
{
public:
//    Global();
    static tagReqHead gReqHead;

    static void GenerateReqSeqno();
public:
    void Init();
    void InitReqHead();

    void ParseServerList(const QString sRsp8006);

    HashtableMsg GetServerList();
    QString GetHostIpAddress();

    void SetLoginRsp(RspBase rsp);

    QString GetParaFrom8001(const QString sKey);

    QString GetTradeTime();
public:
    QString      m_qsSessionID;
    QString      m_qsLockKey;
    bool         m_bLogSuccess;
private:
    HashtableMsg m_htm_server_list;
    RspBase      m_rsp8001;
    int       m_offsetTradeTime;
    QDate        m_tradeDate;
};

#endif // GLOBAL_H
